﻿
/*
	返回一个随机数,需要[RandomView]视图配合
*/
Create FUNCTION [dbo].[GetRamdomNumeric]
(
	@Lower INT =0,
	@Upper INT =100
)
RETURNS int
AS
BEGIN

DECLARE @Result INT


SELECT @Result = ROUND(((@Upper - @Lower -1) * re + @Lower), 0) FROM RandomView

	RETURN @Result

END